package com.pvdnc.nsocket.protocol;

import com.pvdnc.nsocket.serialize.ObjectStream;

public class StreamInterpreter<T> extends Interpreter<T> {
    public StreamInterpreter(String command) {
        super(command);
    }

    @Override
    public byte[] toData(T msg) {
        return ObjectStream.toByte(msg);
    }

    @Override
    public T fromByte(byte[] data) {
        return ObjectStream.fromByte(data);
    }
}
